# Make sure you already have cmake 2.6 installed. For cross compiling.
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

# Additional cmake modules
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules")

# Global definitions
SET(ADD_LIB "")

# Check to use arm toolchain or not
IF(BUILD_FOR_ARM)
    INCLUDE(arm_toolchain)
    USE_ARM_TOOLCHAIN()
ENDIF(BUILD_FOR_ARM)

Project(Sample CXX C)


# Find ZLIB
INCLUDE(FindZLIB)
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
LINK_DIRECTORIES(${ZLIB_LIBRARIES})

INCLUDE(enable_qt)

# Project include directories.
INCLUDE_DIRECTORIES(BEFORE
    /opt/onyx/naboo/include
)
LINK_DIRECTORIES(/opt/onyx/naboo/lib)


# Output directories.
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/libs)
SET(TEST_OUTPUT_PATH ${PROJECT_BINARY_DIR}/unittests)
SET(QT_PLUGINS_OUTPUT_PATH ${PROJECT_BINARY_DIR}/plugins)


# All sub directories.
ADD_SUBDIRECTORY(src)


